package labox.innovation.util;

import java.util.Iterator;

import labox.innovation.config.Config;
import labox.innovation.gameserver.model.L2Object;

/**
 * This class ...
 *
 * @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $
 */

public abstract class L2ObjectMap<T extends L2Object> implements Iterable<T> {

	public abstract int size();

	public abstract boolean isEmpty();

	public abstract void clear();

	public abstract void put(T obj);

	public abstract void remove(T obj);

	public abstract T get(int id);

	public abstract boolean contains(T obj);

	public abstract Iterator<T> iterator();

	public static L2ObjectMap<L2Object> createL2ObjectMap() {
		switch (Config.MAP_TYPE) {
		case WorldObjectMap:
			return new WorldObjectMap<L2Object>();
		default:
			return new WorldObjectTree<L2Object>();
		}
	}
}